home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / info / xemacs.info-3 < prev    next >
Encoding:
GNU Info File  |  1995-09-01  |  46.3 KB  |  1,147 lines

  1. This is Info file ../../info/xemacs.info, produced by Makeinfo-1.63
  2. from the input file xemacs.texi.
  3.  
  4.    This file documents the XEmacs editor.
  5.  
  6.    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
  7. 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
  8. Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
  9.  
  10.    Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.  
  14.    Permission is granted to copy and distribute modified versions of
  15. this manual under the conditions for verbatim copying, provided also
  16. that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
  17. General Public License" are included exactly as in the original, and
  18. provided that the entire resulting derived work is distributed under the
  19. terms of a permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that the sections entitled "The GNU Manifesto",
  24. "Distribution" and "GNU General Public License" may be included in a
  25. translation approved by the author instead of in the original English.
  26.  
  27. 
  28. File: xemacs.info,  Node: Command Switches,  Next: Basic,  Prev: Exiting,  Up: Top
  29.  
  30. Command Line Switches and Arguments
  31. ===================================
  32.  
  33.    XEmacs supports command line arguments you can use to request
  34. various actions when invoking Emacs.  The commands are for compatibility
  35. with other editors and for sophisticated activities.  If you are using
  36. XEmacs under the X window system, you can also use a number of standard
  37. Xt command line arguments. Command line arguments are not usually
  38. needed for editing with Emacs; new users can skip this section.
  39.  
  40.    Many editors are designed to be started afresh each time you want to
  41. edit.  You start the editor to edit one file; then exit the editor.  The
  42. next time you want to edit either another file or the same one, you
  43. start the editor again.  Under these circumstances, it makes sense to
  44. use a command line argument to say which file to edit.
  45.  
  46.    The recommended way to use XEmacs is to start it only once, just
  47. after you log in, and do all your editing in the same Emacs process.
  48. Each time you want to edit a file, you visit it using the existing
  49. Emacs.  Emacs creates a new buffer for each file, and (unless you kill
  50. some of the buffers) Emacs eventually has many files in it ready for
  51. editing.  Usually you do not kill the Emacs process until you are about
  52. to log out.  Since you usually read files by typing commands to Emacs,
  53. command line arguments for specifying a file when Emacs is started are
  54. seldom needed.
  55.  
  56.    Emacs accepts command-line arguments that specify files to visit,
  57. functions to call, and other activities and operating modes.  If you are
  58. running XEmacs under the X window system, a number of standard Xt
  59. command line arguments are available as well.
  60.  
  61.    The following subsections list:
  62.    * Command line arguments that you can always use
  63.  
  64.    * Command line arguments that have to appear at the beginning of the
  65.      argument list
  66.  
  67.    * Command line arguments that are only relevant if you are running
  68.      XEmacs under X
  69.  
  70. Command Line Arguments for Any Position
  71. ---------------------------------------
  72.  
  73.    Command line arguments are processed in the order they appear on the
  74. command line; however, certain arguments (the ones in the second table)
  75. must be at the front of the list if they are used.
  76.  
  77.    Here are the arguments allowed:
  78.  
  79. `FILE'
  80.      Visit FILE using `find-file'.  *Note Visiting::.
  81.  
  82. `+LINENUM FILE'
  83.      Visit FILE using `find-file', then go to line number LINENUM in it.
  84.  
  85. `-load FILE'
  86. `-l FILE'
  87.      Load a file FILE of Lisp code with the function `load'.  *Note
  88.      Lisp Libraries::.
  89.  
  90. `-funcall FUNCTION'
  91. `-f FUNCTION'
  92.      Call Lisp function FUNCTION with no arguments.
  93.  
  94. `-eval FUNCTION'
  95.      Interpret the next argument as a Lisp expression, and evaluate it.
  96.      You must be very careful of the shell quoting here.
  97.  
  98. `-insert FILE'
  99. `-i FILE'
  100.      Insert the contents of FILE into the current buffer.  This is like
  101.      what `M-x insert-buffer' does; *Note Misc File Ops::.
  102.  
  103. `-kill'
  104.      Exit from Emacs without asking for confirmation.
  105.  
  106. `-version'
  107.      Prints version information.  This implies `-batch'.
  108.  
  109.           % xemacs -version
  110.           XEmacs 19.13 of Mon Aug 21 1995 on willow (usg-unix-v) [formerly Lucid Emacs]
  111.  
  112. `-help'
  113.      Prints a summary of command-line options and then exits.
  114.  
  115. Command Line Arguments (Beginning of Line Only)
  116. -----------------------------------------------
  117.  
  118.    The following arguments are recognized only at the beginning of the
  119. command line.  If more than one of them appears, they must appear in the
  120. order in which they appear in this table.
  121.  
  122. `-t FILE'
  123.      Use FILE instead of the terminal for input and output.  This
  124.      implies the `-nw' option, documented below.
  125.  
  126. `-batch'
  127.      Run Emacs in "batch mode", which means that the text being edited
  128.      is not displayed and the standard Unix interrupt characters such as
  129.      `C-z' and `C-c' continue to have their normal effect.  Emacs in
  130.      batch mode outputs to `stderr' only what would normally be printed
  131.      in the echo area under program control.
  132.  
  133.      Batch mode is used for running programs written in Emacs Lisp from
  134.      shell scripts, makefiles, and so on.  Normally the `-l' switch or
  135.      `-f' switch will be used as well, to invoke a Lisp program to do
  136.      the batch processing.
  137.  
  138.      `-batch' implies `-q' (do not load an init file).  It also causes
  139.      Emacs to kill itself after all command switches have been
  140.      processed.  In addition, auto-saving is not done except in buffers
  141.      for which it has been explicitly requested.
  142.  
  143. `-nw'
  144.      Start up XEmacs in TTY mode (using the TTY XEmacs was started
  145.      from), rather than trying to connect to an X display.  Note that
  146.      this happens automatically if the `DISPLAY' environment variable
  147.      is not set.
  148.  
  149. `-debug-init'
  150.      Enter the debugger if an error in the init file occurs.
  151.  
  152. `-unmapped'
  153.      Do not map the initial frame.  This is useful if you want to start
  154.      up XEmacs as a server (e.g. for gnuserv screens or external client
  155.      widgets).
  156.  
  157. `-no-init-file'
  158. `-q'
  159.      Do not load your Emacs init file `~/.emacs'.
  160.  
  161. `-no-site-file'
  162.      Do not load the site-specific init file `lisp/site-start.el'.
  163.  
  164. `-user USER'
  165. `-u USER'
  166.      Load USER's Emacs init file `~USER/.emacs' instead of your own.
  167.  
  168.    Note that the init file can get access to the command line argument
  169. values as the elements of a list in the variable `command-line-args'.
  170. (The arguments in the second table above will already have been
  171. processed and will not be in the list.)  The init file can override the
  172. normal processing of the other arguments by setting this variable.
  173.  
  174.    One way to use command switches is to visit many files automatically:
  175.  
  176.      xemacs *.c
  177.  
  178. passes each `.c' file as a separate argument to Emacs, so that Emacs
  179. visits each file (*note Visiting::.).
  180.  
  181.    Here is an advanced example that assumes you have a Lisp program file
  182. called `hack-c-program.el' which, when loaded, performs some useful
  183. operation on the current buffer, expected to be a C program.
  184.  
  185.      xemacs -batch foo.c -l hack-c-program -f save-buffer -kill > log
  186.  
  187. Here Emacs is told to visit `foo.c', load `hack-c-program.el' (which
  188. makes changes in the visited file), save `foo.c' (note that
  189. `save-buffer' is the function that `C-x C-s' is bound to), and then
  190. exit to the shell from which the command was executed.  `-batch'
  191. guarantees there will be no problem redirecting output to `log',
  192. because Emacs will not assume that it has a display terminal to work
  193. with.
  194.  
  195. Command Line Arguments (for XEmacs Under X)
  196. -------------------------------------------
  197.  
  198.    If you are running XEmacs under X, a number of options are available
  199. to control color, border, and window title and icon name:
  200.  
  201. `-title TITLE'
  202. `-wn TITLE'
  203. `-T TITLE'
  204.      Use TITLE as the window title. This sets the `frame-title-format'
  205.      variable, which controls the title of the X window corresponding
  206.      to the selected frame.  This is the same format as
  207.      `mode-line-format'.
  208.  
  209. `-iconname TITLE'
  210. `-in TITLE'
  211.      Use TITLE as the icon name. This sets the
  212.      `frame-icon-title-format' variable, which controls the title of
  213.      the icon corresponding to the selected frame.
  214.  
  215. `-mc COLOR'
  216.      Use COLOR as the mouse color.
  217.  
  218. `-cr COLOR'
  219.      Use COLOR as the text-cursor foreground color.
  220.  
  221.    In addition, XEmacs allows you to use a number of standard Xt
  222. command line arguments.
  223.  
  224. `-background COLOR'
  225. `-bg COLOR'
  226.      Use COLOR as the background color.
  227.  
  228. `-bordercolor COLOR'
  229. `-bd COLOR'
  230.      Use COLOR as the border color.
  231.  
  232. `-borderwidth WIDTH'
  233. `-bw WIDTH'
  234.      Use WIDTH as the border width.
  235.  
  236. `-display DISPLAY'
  237. `-d DISPLAY'
  238.      When running under the X window system, create the window
  239.      containing the Emacs frame on the display named DISPLAY.
  240.  
  241. `-foreground COLOR'
  242. `-fg COLOR'
  243.      Use COLOR as the foreground color.
  244.  
  245. `-font NAME'
  246. `-fn NAME'
  247.      Use NAME as the default font.
  248.  
  249. `-geometry SPEC'
  250. `-geom SPEC'
  251. `-g SPEC'
  252.      Use the geometry (window size and/or position) specified by SPEC.
  253.  
  254. `-iconic'
  255.      Start up iconified.
  256.  
  257. `-rv'
  258.      Bring up Emacs in reverse video.
  259.  
  260. `-NAME'
  261.      Use the resource manager resources specified by NAME.  The default
  262.      is to use the name of the program (`argv[0]') as the resource
  263.      manager name.
  264.  
  265. `-xrm'
  266.      Read something into the resource database for this invocation of
  267.      Emacs only.
  268.  
  269. 
  270. File: xemacs.info,  Node: Basic,  Next: Undo,  Prev: Command Switches,  Up: Top
  271.  
  272. Basic Editing Commands
  273. **********************
  274.  
  275.    We now give the basics of how to enter text, make corrections, and
  276. save the text in a file.  If this material is new to you, you might
  277. learn it more easily by running the Emacs learn-by-doing tutorial.  To
  278. do this, type `Control-h t' (`help-with-tutorial').
  279.  
  280. Inserting Text
  281. ==============
  282.  
  283.    To insert printing characters into the text you are editing, just
  284. type them.  This inserts the characters into the buffer at the cursor
  285. (that is, at "point"; *note Point::.).  The cursor moves forward.  Any
  286. characters after the cursor move forward too.  If the text in the buffer
  287. is `FOOBAR', with the cursor before the `B', and you type `XX', the
  288. result is `FOOXXBAR', with the cursor still before the `B'.
  289.  
  290.    To "delete" text you have just inserted, use DEL.  DEL deletes the
  291. character BEFORE the cursor (not the one that the cursor is on top of
  292. or under; that is the character AFTER the cursor).  The cursor and all
  293. characters after it move backwards.  Therefore, if you type a printing
  294. character and then type DEL, they cancel out.
  295.  
  296.    To end a line and start typing a new one, type RET.  This inserts a
  297. newline character in the buffer.  If point is in the middle of a line,
  298. RET splits the line.  Typing DEL when the cursor is at the beginning of
  299. a line rubs out the newline before the line, thus joining the line with
  300. the preceding line.
  301.  
  302.    Emacs automatically splits lines when they become too long, if you
  303. turn on a special mode called "Auto Fill" mode.  *Note Filling::, for
  304. information on using Auto Fill mode.
  305.  
  306.    Customization information: DEL, in most modes, runs the command
  307. `delete-backward-char'; RET runs the command `newline', and
  308. self-inserting printing characters run the command `self-insert', which
  309. inserts whatever character was typed to invoke it.  Some major modes
  310. rebind DEL to other commands.
  311.  
  312.    Direct insertion works for printing characters and SPC, but other
  313. characters act as editing commands and do not insert themselves.  If
  314. you need to insert a control character or a character whose code is
  315. above 200 octal, you must "quote" it by typing the character
  316. `control-q' (`quoted-insert') first.  There are two ways to use `C-q':
  317.  
  318.    * `Control-q' followed by any non-graphic character (even `C-g')
  319.      inserts that character.
  320.  
  321.    * `Control-q' followed by three octal digits inserts the character
  322.      with the specified character code.
  323.  
  324. A numeric argument to `C-q' specifies how many copies of the quoted
  325. character should be inserted (*note Arguments::.).
  326.  
  327.    If you prefer to have text characters replace (overwrite) existing
  328. text instead of moving it to the right, you can enable Overwrite mode, a
  329. minor mode.  *Note Minor Modes::.
  330.  
  331. Changing the Location of Point
  332. ==============================
  333.  
  334.    To do more than insert characters, you have to know how to move point
  335. (*note Point::.).  Here are a few of the available commands.
  336.  
  337.    NOTE: Many of the following commands have two versions, one that uses
  338. the function keys (e.g. LEFT or END) and one that doesn't.  The former
  339. versions may only be available on X terminals (i.e. not on TTY's), but
  340. the latter are available on all terminals.
  341.  
  342. `C-a'
  343. `HOME'
  344.      Move to the beginning of the line (`beginning-of-line').
  345.  
  346. `C-e'
  347. `END'
  348.      Move to the end of the line (`end-of-line').
  349.  
  350. `C-f'
  351. `RIGHT'
  352.      Move forward one character (`forward-char').
  353.  
  354. `C-b'
  355. `LEFT'
  356.      Move backward one character (`backward-char').
  357.  
  358. `M-f'
  359. `C-RIGHT'
  360.      Move forward one word (`forward-word').
  361.  
  362. `M-b'
  363. `C-LEFT'
  364.      Move backward one word (`backward-word').
  365.  
  366. `C-n'
  367. `DOWN'
  368.      Move down one line, vertically (`next-line').  This command
  369.      attempts to keep the horizontal position unchanged, so if you
  370.      start in the middle of one line, you end in the middle of the
  371.      next.  When on the last line of text, `C-n' creates a new line and
  372.      moves onto it.
  373.  
  374. `C-p'
  375. `UP'
  376.      Move up one line, vertically (`previous-line').
  377.  
  378. `C-v'
  379. `PGDN'
  380.      Move down one page, vertically (`scroll-up').
  381.  
  382. `M-v'
  383. `PGUP'
  384.      Move up one page, vertically (`scroll-down').
  385.  
  386. `C-l'
  387.      Clear the frame and reprint everything (`recenter').  Text moves
  388.      on the frame to bring point to the center of the window.
  389.  
  390. `M-r'
  391.      Move point to left margin on the line halfway down the frame or
  392.      window (`move-to-window-line').  Text does not move on the frame.
  393.      A numeric argument says how many screen lines down from the top of
  394.      the window (zero for the top).  A negative argument counts from
  395.      the bottom (-1 for the bottom).
  396.  
  397. `C-t'
  398.      Transpose two characters, the ones before and after the cursor
  399.      (`transpose-chars').
  400.  
  401. `M-<'
  402. `C-HOME'
  403.      Move to the top of the buffer (`beginning-of-buffer').  With
  404.      numeric argument N, move to N/10 of the way from the top.  *Note
  405.      Arguments::, for more information on numeric arguments.
  406.  
  407. `M->'
  408. `C-END'
  409.      Move to the end of the buffer (`end-of-buffer').
  410.  
  411. `M-x goto-char'
  412.      Read a number N and move the cursor to character number N.
  413.      Position 1 is the beginning of the buffer.
  414.  
  415. `M-g'
  416.      Read a number N and move cursor to line number N (`goto-line').
  417.      Line 1 is the beginning of the buffer.
  418.  
  419. `C-x C-n'
  420.      Use the current column of point as the "semi-permanent goal
  421.      column" for `C-n' and `C-p' (`set-goal-column').  Henceforth, those
  422.      commands always move to this column in each line moved into, or as
  423.      close as possible given the contents of the line.  This goal
  424.      column remains in effect until canceled.
  425.  
  426. `C-u C-x C-n'
  427.      Cancel the goal column.  Henceforth, `C-n' and `C-p' once again
  428.      try to avoid changing the horizontal position, as usual.
  429.  
  430.    If you set the variable `track-eol' to a non-`nil' value, `C-n' and
  431. `C-p' move to the end of the line when at the end of the starting line.
  432. By default, `track-eol' is `nil'.
  433.  
  434. Erasing Text
  435. ============
  436.  
  437. `DEL'
  438.      Delete the character before the cursor (`delete-backward-char').
  439.  
  440. `C-d'
  441.      Delete the character after the cursor (`delete-char').
  442.  
  443. `C-k'
  444.      Kill to the end of the line (`kill-line').
  445.  
  446. `M-d'
  447.      Kill forward to the end of the next word (`kill-word').
  448.  
  449. `M-DEL'
  450.      Kill back to the beginning of the previous word
  451.      (`backward-kill-word').
  452.  
  453.    In contrast to the DEL key, which deletes the character before the
  454. cursor, `Control-d' deletes the character after the cursor, causing the
  455. rest of the text on the line to shift left.  If `Control-d' is typed at
  456. the end of a line, that line and the next line are joined.
  457.  
  458.    To erase a larger amount of text, use `Control-k', which kills a
  459. line at a time.  If you use `C-k' at the beginning or in the middle of
  460. a line, it kills all the text up to the end of the line.  If you use
  461. `C-k' at the end of a line, it joins that line and the next line.
  462.  
  463.    *Note Killing::, for more flexible ways of killing text.
  464.  
  465. Files
  466. =====
  467.  
  468.    The commands above are sufficient for creating and altering text in
  469. an Emacs buffer.  More advanced Emacs commands just make things easier.
  470. But to keep any text permanently you must put it in a "file".  Files
  471. are named units of text which are stored by the operating system and
  472. which you can retrieve by name.  To look at or use the contents of a
  473. file in any way, including editing the file with Emacs, you must
  474. specify the file name.
  475.  
  476.    Consider a file named `/usr/rms/foo.c'.  To begin editing this file
  477. from Emacs, type:
  478.  
  479.      C-x C-f /usr/rms/foo.c RET
  480.  
  481. The file name is given as an "argument" to the command `C-x C-f'
  482. (`find-file').  The command uses the "minibuffer" to read the argument.
  483. You have to type RET to terminate the argument (*note Minibuffer::.).
  484.  
  485.    You can also use the Open... menu item from the File menu, then type
  486. the name of the file to the prompt.
  487.  
  488.    Emacs obeys the command by "visiting" the file: it creates a buffer,
  489. copies the contents of the file into the buffer, and then displays the
  490. buffer for you to edit.  You can make changes in the buffer, and then
  491. "save" the file by typing `C-x C-s' (`save-buffer') or choosing Save
  492. Buffer from the File menu.  This makes the changes permanent by copying
  493. the altered contents of the buffer back into the file `/usr/rms/foo.c'.
  494. Until then, the changes are only inside your Emacs buffer, and the
  495. file `foo.c' is not changed.
  496.  
  497.    To create a file, visit the file with `C-x C-f' as if it already
  498. existed or choose Open... from the File menu and provide the name for
  499. the new file in the minibuffer.  Emacs will create an empty buffer in
  500. which you can insert the text you want to put in the file.  When you
  501. save the buffer with `C-x C-s', or by choosing Save Buffer from the
  502. File menu, the file is created.
  503.  
  504.    To learn more about using files, *note Files::..
  505.  
  506. Help
  507. ====
  508.  
  509.    If you forget what a key does, you can use the Help character
  510. (`C-h') to find out: Type `C-h k' followed by the key you want to know
  511. about.  For example, `C-h k C-n' tells you what `C-n' does.  `C-h' is a
  512. prefix key; `C-h k' is just one of its subcommands (the command
  513. `describe-key').  The other subcommands of `C-h' provide different
  514. kinds of help.  Type `C-h' three times to get a description of all the
  515. help facilities.  *Note Help::.
  516.  
  517. * Menu:
  518.  
  519. * Blank Lines::        Commands to make or delete blank lines.
  520. * Continuation Lines:: Lines too wide for the frame.
  521. * Position Info::      What page, line, row, or column is point on?
  522. * Arguments::           Numeric arguments for repeating a command.
  523.  
  524. 
  525. File: xemacs.info,  Node: Blank Lines,  Next: Continuation Lines,  Prev: Basic,  Up: Basic
  526.  
  527. Blank Lines
  528. ===========
  529.  
  530.    Here are special commands and techniques for entering and removing
  531. blank lines.
  532.  
  533. `C-o'
  534.      Insert one or more blank lines after the cursor (`open-line').
  535.  
  536. `C-x C-o'
  537.      Delete all but one of many consecutive blank lines
  538.      (`delete-blank-lines').
  539.  
  540.    When you want to insert a new line of text before an existing line,
  541. you just type the new line of text, followed by RET.  If you prefer to
  542. create a blank line first and then insert the desired text, use the key
  543. `C-o' (`open-line'), which inserts a newline after point but leaves
  544. point in front of the newline.  Then type the text into the new line.
  545. `C-o F O O' has the same effect as `F O O RET', except for the final
  546. location of point.
  547.  
  548.    To create several blank lines, type `C-o' several times, or give
  549. `C-o' an argument indicating how many blank lines to create.  *Note
  550. Arguments::, for more information.
  551.  
  552.    If you have many blank lines in a row and want to get rid of them,
  553. use `C-x C-o' (`delete-blank-lines').  If point is on a blank line
  554. which is adjacent to at least one other blank line, `C-x C-o' deletes
  555. all but one of the blank lines.  If point is on a blank line with no
  556. other adjacent blank line, the sole blank line is deleted.  If point is
  557. on a non-blank line, `C-x C-o' deletes any blank lines following that
  558. non-blank line.
  559.  
  560. 
  561. File: xemacs.info,  Node: Continuation Lines,  Next: Position Info,  Prev: Blank Lines,  Up: Basic
  562.  
  563. Continuation Lines
  564. ==================
  565.  
  566.    If you add too many characters to one line without breaking with a
  567. RET, the line grows to occupy two (or more) screen lines, with a curved
  568. arrow at the extreme right margin of all but the last line.  The curved
  569. arrow indicates that the following screen line is not really a distinct
  570. line in the text, but just the "continuation" of a line too long to fit
  571. the frame.  You can use Auto Fill mode (*note Filling::.) to have Emacs
  572. insert newlines automatically when a line gets too long.
  573.  
  574.    Instead of continuation, long lines can be displayed by "truncation".
  575. This means that all the characters that do not fit in the width of the
  576. frame or window do not appear at all.  They remain in the buffer,
  577. temporarily invisible.  Three diagonal dots in the last column (instead
  578. of the curved arrow inform you that truncation is in effect.
  579.  
  580.    To turn off continuation for a particular buffer, set the variable
  581. `truncate-lines' to non-`nil' in that buffer.  Truncation instead of
  582. continuation also happens whenever horizontal scrolling is in use, and
  583. optionally whenever side-by-side windows are in use (*note Windows::.).
  584. Altering the value of `truncate-lines' makes it local to the current
  585. buffer; until that time, the default value is in effect.  The default
  586. is initially `nil'.  *Note Locals::.
  587.  
  588. 
  589. File: xemacs.info,  Node: Position Info,  Next: Arguments,  Prev: Continuation Lines,  Up: Basic
  590.  
  591. Cursor Position Information
  592. ===========================
  593.  
  594.    If you are accustomed to other display editors, you may be surprised
  595. that Emacs does not always display the page number or line number of
  596. point in the mode line.  In Emacs, this information is only rarely
  597. needed, and a number of commands are available to compute and print it.
  598. Since text is stored in a way that makes it difficult to compute the
  599. information, it is not displayed all the time.
  600.  
  601. `M-x what-page'
  602.      Print page number of point, and line number within page.
  603.  
  604. `M-x what-line'
  605.      Print line number of point in the buffer.
  606.  
  607. `M-='
  608.      Print number of lines and characters in the current region
  609.      (`count-lines-region').
  610.  
  611. `C-x ='
  612.      Print character code of character after point, character position
  613.      of point, and column of point (`what-cursor-position').
  614.  
  615.    There are several commands for printing line numbers:
  616.    * `M-x what-line' counts lines from the beginning of the file and
  617.      prints the line number point is on.  The first line of the file is
  618.      line number 1.  You can use these numbers as arguments to `M-x
  619.      goto-line'.
  620.  
  621.    * `M-x what-page' counts pages from the beginning of the file, and
  622.      counts lines within the page, printing both of them.  *Note
  623.      Pages::, for the command `C-x l', which counts the lines in the
  624.      current page.
  625.  
  626.    * `M-=' (`count-lines-region') prints the number of lines in the
  627.      region (*note Mark::.).
  628.  
  629.    The command `C-x =' (`what-cursor-position') provides information
  630. about point and about the column the cursor is in.  It prints a line in
  631. the echo area that looks like this:
  632.  
  633.      Char: x (0170)  point=65986 of 563027(12%)  column 44
  634.  
  635. (In fact, this is the output produced when point is before `column 44'
  636. in the example.)
  637.  
  638.    The two values after `Char:' describe the character following point,
  639. first by showing it and second by giving its octal character code.
  640.  
  641.    `point=' is followed by the position of point expressed as a
  642. character count.  The front of the buffer counts as position 1, one
  643. character later as 2, and so on.  The next, larger number is the total
  644. number of characters in the buffer.  Afterward in parentheses comes the
  645. position expressed as a percentage of the total size.
  646.  
  647.    `column' is followed by the horizontal position of point, in columns
  648. from the left edge of the window.
  649.  
  650.    If the buffer has been narrowed, making some of the text at the
  651. beginning and the end temporarily invisible, `C-x =' prints additional
  652. text describing the current visible range.  For example, it might say:
  653.  
  654.      Char: x (0170)  point=65986 of 563025(12%) <65102 - 68533>  column 44
  655.  
  656. where the two extra numbers give the smallest and largest character
  657. position that point is allowed to assume.  The characters between those
  658. two positions are the visible ones.  *Note Narrowing::.
  659.  
  660.    If point is at the end of the buffer (or the end of the visible
  661. part), `C-x =' omits any description of the character after point.  The
  662. output looks like
  663.  
  664.      point=563026 of 563025(100%)  column 0
  665.  
  666. 
  667. File: xemacs.info,  Node: Arguments,  Prev: Position Info,  Up: Basic
  668.  
  669. Numeric Arguments
  670. =================
  671.  
  672.    Any Emacs command can be given a "numeric argument".  Some commands
  673. interpret the argument as a repetition count.  For example, giving an
  674. argument of ten to the key `C-f' (the command `forward-char', move
  675. forward one character) moves forward ten characters.  With these
  676. commands, no argument is equivalent to an argument of one.  Negative
  677. arguments are allowed.  Often they tell a command to move or act
  678. backwards.
  679.  
  680.    If your keyboard has a META key (labelled with a diamond on Sun-type
  681. keyboards and labelled `Alt' on some other keyboards), the easiest way
  682. to specify a numeric argument is to type digits and/or a minus sign
  683. while holding down the the META key.  For example,
  684.      M-5 C-n
  685.  
  686. moves down five lines.  The characters `Meta-1', `Meta-2', and so on,
  687. as well as `Meta--', do this because they are keys bound to commands
  688. (`digit-argument' and `negative-argument') that are defined to
  689. contribute to an argument for the next command.
  690.  
  691.    Another way of specifying an argument is to use the `C-u'
  692. (`universal-argument') command followed by the digits of the argument.
  693. With `C-u', you can type the argument digits without holding down shift
  694. keys.  To type a negative argument, start with a minus sign.  Just a
  695. minus sign normally means -1.  `C-u' works on all terminals.
  696.  
  697.    `C-u' followed by a character which is neither a digit nor a minus
  698. sign has the special meaning of "multiply by four".  It multiplies the
  699. argument for the next command by four.  `C-u' twice multiplies it by
  700. sixteen.  Thus, `C-u C-u C-f' moves forward sixteen characters.  This
  701. is a good way to move forward "fast", since it moves about 1/5 of a line
  702. in the usual size frame.  Other useful combinations are `C-u C-n', `C-u
  703. C-u C-n' (move down a good fraction of a frame), `C-u C-u C-o' (make "a
  704. lot" of blank lines), and `C-u C-k' (kill four lines).
  705.  
  706.    Some commands care only about whether there is an argument and not
  707. about its value.  For example, the command `M-q' (`fill-paragraph') with
  708. no argument fills text; with an argument, it justifies the text as well.
  709. (*Note Filling::, for more information on `M-q'.)  Just `C-u' is a
  710. handy way of providing an argument for such commands.
  711.  
  712.    Some commands use the value of the argument as a repeat count, but do
  713. something peculiar when there is no argument.  For example, the command
  714. `C-k' (`kill-line') with argument N kills N lines, including their
  715. terminating newlines.  But `C-k' with no argument is special: it kills
  716. the text up to the next newline, or, if point is right at the end of
  717. the line, it kills the newline itself.  Thus, two `C-k' commands with
  718. no arguments can kill a non-blank line, just like `C-k' with an
  719. argument of one.  (*Note Killing::, for more information on `C-k'.)
  720.  
  721.    A few commands treat a plain `C-u' differently from an ordinary
  722. argument.  A few others may treat an argument of just a minus sign
  723. differently from an argument of -1.  These unusual cases will be
  724. described when they come up; they are always to make the individual
  725. command more convenient to use.
  726.  
  727. 
  728. File: xemacs.info,  Node: Undo,  Next: Minibuffer,  Prev: Basic,  Up: Top
  729.  
  730. Undoing Changes
  731. ***************
  732.  
  733.    Emacs allows you to undo all changes you make to the text of a
  734. buffer, up to a certain amount of change (8000 characters).  Each
  735. buffer records changes individually, and the undo command always
  736. applies to the current buffer.  Usually each editing command makes a
  737. separate entry in the undo records, but some commands such as
  738. `query-replace' make many entries, and very simple commands such as
  739. self-inserting characters are often grouped to make undoing less
  740. tedious.
  741.  
  742. `C-x u'
  743.      Undo one batch of changes (usually, one command's worth) (`undo').
  744.  
  745. `C-_'
  746.      The same.
  747.  
  748.    The command `C-x u' or `C-_' allows you to undo changes.  The first
  749. time you give this command, it undoes the last change.  Point moves to
  750. the text affected by the undo, so you can see what was undone.
  751.  
  752.    Consecutive repetitions of the `C-_' or `C-x u' commands undo
  753. earlier and earlier changes, back to the limit of what has been
  754. recorded.  If all recorded changes have already been undone, the undo
  755. command prints an error message and does nothing.
  756.  
  757.    Any command other than an undo command breaks the sequence of undo
  758. commands.  Starting at this moment, the previous undo commands are
  759. considered ordinary changes that can themselves be undone.  Thus, you
  760. can redo changes you have undone by typing `C-f' or any other command
  761. that have no important effect, and then using more undo commands.
  762.  
  763.    If you notice that a buffer has been modified accidentally, the
  764. easiest way to recover is to type `C-_' repeatedly until the stars
  765. disappear from the front of the mode line.  When that happens, all the
  766. modifications you made have been canceled.  If you do not remember
  767. whether you changed the buffer deliberately, type `C-_' once. When you
  768. see Emacs undo the last change you made, you probably remember why you
  769. made it.  If the change was an accident, leave it undone.  If it was
  770. deliberate, redo the change as described in the preceding paragraph.
  771.  
  772.    Whenever an undo command makes the stars disappear from the mode
  773. line, the buffer contents is the same as it was when the file was last
  774. read in or saved.
  775.  
  776.    Not all buffers record undo information.  Buffers whose names start
  777. with spaces don't; these buffers are used internally by Emacs and its
  778. extensions to hold text that users don't normally look at or edit.
  779. Minibuffers, help buffers, and documentation buffers also don't record
  780. undo information.
  781.  
  782.    Emacs can remember at most 8000 or so characters of deleted or
  783. modified text in any one buffer for reinsertion by the undo command.
  784. There is also a limit on the number of individual insert, delete, or
  785. change actions that Emacs can remember.
  786.  
  787.    There are two keys to run the `undo' command, `C-x u' and `C-_',
  788. because on some keyboards, it is not obvious how to type `C-_'. `C-x u'
  789. is an alternative you can type in the same fashion on any terminal.
  790.  
  791. 
  792. File: xemacs.info,  Node: Minibuffer,  Next: M-x,  Prev: Undo,  Up: Top
  793.  
  794. The Minibuffer
  795. **************
  796.  
  797.    Emacs commands use the "minibuffer" to read arguments more
  798. complicated than a single number.  Minibuffer arguments can be file
  799. names, buffer names, Lisp function names, Emacs command names, Lisp
  800. expressions, and many other things, depending on the command reading the
  801. argument.  To edit the argument in the minibuffer, you can use Emacs
  802. editing commands.
  803.  
  804.    When the minibuffer is in use, it appears in the echo area, and the
  805. cursor moves there.  The beginning of the minibuffer line displays a
  806. "prompt" indicating what kind of input you should supply and how it
  807. will be used.  The prompt is often derived from the name of the command
  808. the argument is for.  The prompt normally ends with a colon.
  809.  
  810.    Sometimes a "default argument" appears in parentheses after the
  811. colon; it, too, is part of the prompt.  The default is used as the
  812. argument value if you enter an empty argument (e.g., by just typing
  813. RET).  For example, commands that read buffer names always show a
  814. default, which is the name of the buffer that will be used if you type
  815. just RET.
  816.  
  817.    The simplest way to give a minibuffer argument is to type the text
  818. you want, terminated by RET to exit the minibuffer.  To get out of the
  819. minibuffer and cancel the command that it was for, type `C-g'.
  820.  
  821.    Since the minibuffer uses the screen space of the echo area, it can
  822. conflict with other ways Emacs customarily uses the echo area.  Here is
  823. how Emacs handles such conflicts:
  824.  
  825.    * If a command gets an error while you are in the minibuffer, this
  826.      does not cancel the minibuffer.  However, the echo area is needed
  827.      for the error message and therefore the minibuffer itself is
  828.      hidden for a while.  It comes back after a few seconds, or as soon
  829.      as you type anything.
  830.  
  831.    * If you use a command in the minibuffer whose purpose is to print a
  832.      message in the echo area (for example `C-x =') the message is
  833.      displayed normally, and the minibuffer is hidden for a while.  It
  834.      comes back after a few seconds, or as soon as you type anything.
  835.  
  836.    * Echoing of keystrokes does not take place while the minibuffer is
  837.      in use.
  838.  
  839. * Menu:
  840.  
  841. * File: Minibuffer File.  Entering file names with the minibuffer.
  842. * Edit: Minibuffer Edit.  How to edit in the minibuffer.
  843. * Completion::          An abbreviation facility for minibuffer input.
  844. * Repetition::          Re-executing commands that used the minibuffer.
  845.  
  846. 
  847. File: xemacs.info,  Node: Minibuffer File,  Next: Minibuffer Edit,  Prev: Minibuffer,  Up: Minibuffer
  848.  
  849. Minibuffers for File Names
  850. ==========================
  851.  
  852.    Sometimes the minibuffer starts out with text in it.  For example,
  853. when you are supposed to give a file name, the minibuffer starts out
  854. containing the "default directory", which ends with a slash.  This
  855. informs you in which directory the file will be looked for if you do
  856. not specify a different one. For example, the minibuffer might start
  857. out with:
  858.  
  859.      Find File: /u2/emacs/src/
  860.  
  861. where `Find File: ' is the prompt.  Typing `buffer.c' specifies the file
  862. `/u2/emacs/src/buffer.c'.  To find files in nearby directories, use
  863. `..'; thus, if you type `../lisp/simple.el', the file that you visit
  864. will be the one named
  865. `/u2/emacs/lisp/simple.el'.  Alternatively, you can use  `M-DEL' to
  866. kill directory names you don't want (*note Words::.).
  867.  
  868.    You can also type an absolute file name, one starting with a slash
  869. or a tilde, ignoring the default directory.  For example, to find the
  870. file `/etc/termcap', just type the name, giving:
  871.  
  872.      Find File: /u2/emacs/src//etc/termcap
  873.  
  874. Two slashes in a row are not normally meaningful in Unix file names, but
  875. they are allowed in XEmacs.  They mean, "ignore everything before the
  876. second slash in the pair."  Thus, `/u2/emacs/src/' is ignored, and you
  877. get the file `/etc/termcap'.
  878.  
  879.    If you set `insert-default-directory' to `nil', the default
  880. directory is not inserted in the minibuffer.  This way, the minibuffer
  881. starts out empty.  But the name you type, if relative, is still
  882. interpreted with respect to the same default directory.
  883.  
  884. 
  885. File: xemacs.info,  Node: Minibuffer Edit,  Next: Completion,  Prev: Minibuffer File,  Up: Minibuffer
  886.  
  887. Editing in the Minibuffer
  888. =========================
  889.  
  890.    The minibuffer is an Emacs buffer (albeit a peculiar one), and the
  891. usual Emacs commands are available for editing the text of an argument
  892. you are entering.
  893.  
  894.    Since RET in the minibuffer is defined to exit the minibuffer, you
  895. must use `C-o' or `C-q LFD' to insert a newline into the minibuffer.
  896. (Recall that a newline is really the LFD character.)
  897.  
  898.    The minibuffer has its own window, which always has space on the
  899. screen but acts as if it were not there when the minibuffer is not in
  900. use.  The minibuffer window is just like the others; you can switch to
  901. another window with `C-x o', edit text in other windows, and perhaps
  902. even visit more files before returning to the minibuffer to submit the
  903. argument.  You can kill text in another window, return to the minibuffer
  904. window, and then yank the text to use it in the argument.  *Note
  905. Windows::.
  906.  
  907.    There are, however, some restrictions on the use of the minibuffer
  908. window.  You cannot switch buffers in it--the minibuffer and its window
  909. are permanently attached.  You also cannot split or kill the minibuffer
  910. window, but you can make it taller with `C-x ^'.
  911.  
  912.    If you are in the minibuffer and issue a command that displays help
  913. text in another window, that window will be scrolled if you type
  914. `M-C-v' while in the minibuffer until you exit the minibuffer.  This
  915. feature is helpful if a completing minibuffer gives you a long list of
  916. possible completions.
  917.  
  918.    If the variable `minibuffer-confirm-incomplete' is `t', you are
  919. asked for confirmation if there is no known completion for the text you
  920. typed. For example, if you attempted to visit a non-existent file, the
  921. minibuffer might read:
  922.              Find File:chocolate_bar.c [no completions, confirm]
  923.    If you press `Return' again, that confirms the filename. Otherwise,
  924. you can continue editing it.
  925.  
  926.    Emacs supports recursive use of the minibuffer.  However, it is easy
  927. to do this by accident (because of autorepeating keyboards, for
  928. example) and get confused.  Therefore, most Emacs commands that use the
  929. minibuffer refuse to operate if the minibuffer window is selected.  If
  930. the minibuffer is active but you have switched to a different window,
  931. recursive use of the minibuffer is allowed--if you know enough to try
  932. to do this, you probably will not get confused.
  933.  
  934.    If you set the variable `enable-recursive-minibuffers' to be
  935. non-`nil', recursive use of the minibuffer is always allowed.
  936.  
  937. 
  938. File: xemacs.info,  Node: Completion,  Next: Repetition,  Prev: Minibuffer Edit,  Up: Minibuffer
  939.  
  940. Completion
  941. ==========
  942.  
  943.    When appropriate, the minibuffer provides a "completion" facility.
  944. You type the beginning of an argument and one of the completion keys,
  945. and Emacs visibly fills in the rest, depending on what you have already
  946. typed.
  947.  
  948.    When completion is available, certain keys--TAB, RET, and SPC--are
  949. redefined to complete an abbreviation present in the minibuffer into a
  950. longer string that it stands for, by matching it against a set of
  951. "completion alternatives" provided by the command reading the argument.
  952. `?' is defined to display a list of possible completions of what you
  953. have inserted.
  954.  
  955.    For example, when the minibuffer is being used by `Meta-x' to read
  956. the name of a command, it is given a list of all available Emacs command
  957. names to complete against.  The completion keys match the text in the
  958. minibuffer against all the command names, find any additional
  959. characters of the name that are implied by the ones already present in
  960. the minibuffer, and add those characters to the ones you have given.
  961.  
  962.    Case is normally significant in completion because it is significant
  963. in most of the names that you can complete (buffer names, file names,
  964. and command names).  Thus, `fo' will not complete to `Foo'.  When you
  965. are completing a name in which case does not matter, case may be ignored
  966. for completion's sake if specified by program.
  967.  
  968.    When a completion list is displayed, the completions will highlight
  969. as you move the mouse over them.  Clicking the middle mouse button on
  970. any highlighted completion will "select" it just as if you had typed it
  971. in and hit RET.
  972.  
  973. A Completion Example
  974. --------------------
  975.  
  976.    Consider the following example.  If you type `Meta-x au TAB', TAB
  977. looks for alternatives (in this case, command names) that start with
  978. `au'.  There are only two commands: `auto-fill-mode' and
  979. `auto-save-mode'.  They are the same as far as `auto-', so the `au' in
  980. the minibuffer changes to `auto-'.
  981.  
  982.    If you type TAB again immediately, there are multiple possibilities
  983. for the very next character--it could be `s' or `f'--so no more
  984. characters are added; but a list of all possible completions is
  985. displayed in another window.
  986.  
  987.    If you go on to type `f TAB', this TAB sees `auto-f'.  The only
  988. command name starting this way is `auto-fill-mode', so completion
  989. inserts the rest of that command.  You now have `auto-fill-mode' in the
  990. minibuffer after typing just `au TAB f TAB'.  Note that TAB has this
  991. effect because in the minibuffer it is bound to the function
  992. `minibuffer-complete' when completion is supposed to be done.
  993.  
  994. Completion Commands
  995. -------------------
  996.  
  997.    Here is a list of all the completion commands defined in the
  998. minibuffer when completion is available.
  999.  
  1000. `TAB'
  1001.      Complete the text in the minibuffer as much as possible
  1002.      (`minibuffer-complete').
  1003.  
  1004. `SPC'
  1005.      Complete the text in the minibuffer but don't add or fill out more
  1006.      than one word (`minibuffer-complete-word').
  1007.  
  1008. `RET'
  1009.      Submit the text in the minibuffer as the argument, possibly
  1010.      completing first as described below
  1011.      (`minibuffer-complete-and-exit').
  1012.  
  1013. `?'
  1014.      Print a list of all possible completions of the text in the
  1015.      minibuffer (`minibuffer-list-completions').
  1016.  
  1017. `button2'
  1018.      Select the highlighted text under the mouse as a minibuffer
  1019.      response.  When the minibuffer is being used to prompt the user
  1020.      for a completion, any valid completions which are visible on the
  1021.      screen will be highlighted when the mouse moves over them.
  1022.      Clicking button2 will select the highlighted completion and exit
  1023.      the minibuffer.  (`minibuf-select-highlighted-completion').
  1024.  
  1025.    SPC completes in a way that is similar to TAB, but it never goes
  1026. beyond the next hyphen or space.  If you have `auto-f' in the
  1027. minibuffer and type SPC, it finds that the completion is
  1028. `auto-fill-mode', but it stops completing after `fill-'.  The result is
  1029. `auto-fill-'. Another SPC at this point completes all the way to
  1030. `auto-fill-mode'.  SPC in the minibuffer runs the function
  1031. `minibuffer-complete-word' when completion is available.
  1032.  
  1033.    There are three different ways that RET can work in completing
  1034. minibuffers, depending on how the argument will be used.
  1035.  
  1036.    * "Strict" completion is used when it is meaningless to give any
  1037.      argument except one of the known alternatives.  For example, when
  1038.      `C-x k' reads the name of a buffer to kill, it is meaningless to
  1039.      give anything but the name of an existing buffer.  In strict
  1040.      completion, RET refuses to exit if the text in the minibuffer does
  1041.      not complete to an exact match.
  1042.  
  1043.    * "Cautious" completion is similar to strict completion, except that
  1044.      RET exits only if the text was an exact match already, not needing
  1045.      completion.  If the text is not an exact match, RET does not exit,
  1046.      but it does complete the text.  If it completes to an exact match,
  1047.      a second RET will exit.
  1048.  
  1049.      Cautious completion is used for reading file names for files that
  1050.      must already exist.
  1051.  
  1052.    * "Permissive" completion is used when any string is meaningful, and
  1053.      the list of completion alternatives is just a guide.  For example,
  1054.      when `C-x C-f' reads the name of a file to visit, any file name is
  1055.      allowed, in case you want to create a file.  In permissive
  1056.      completion, RET takes the text in the minibuffer exactly as given,
  1057.      without completing it.
  1058.  
  1059.    The completion commands display a list of all possible completions
  1060. in a window whenever there is more than one possibility for the very
  1061. next character.  Typing `?' explicitly requests such a list.  The list
  1062. of completions counts as help text, so `C-M-v' typed in the minibuffer
  1063. scrolls the list.
  1064.  
  1065.    When completion is done on file names, certain file names are usually
  1066. ignored.  The variable `completion-ignored-extensions' contains a list
  1067. of strings; a file whose name ends in any of those strings is ignored
  1068. as a possible completion.  The standard value of this variable has
  1069. several elements including `".o"', `".elc"', `".dvi"' and `"~"'.  The
  1070. effect is that, for example, `foo' completes to `foo.c' even though
  1071. `foo.o' exists as well.  If the only possible completions are files
  1072. that end in "ignored" strings, they are not ignored.
  1073.  
  1074.    If a completion command finds the next character is undetermined, it
  1075. automatically displays a list of all possible completions.  If the
  1076. variable `completion-auto-help' is set to `nil', this does not happen,
  1077. and you must type `?' to display the possible completions.
  1078.  
  1079.    If the variable `minibuffer-confirm-incomplete' is set to `t', then
  1080. in contexts where `completing-read' allows answers that are not valid
  1081. completions, an extra RET must be typed to confirm the response.  This
  1082. is helpful for catching typos.
  1083.  
  1084. 
  1085. File: xemacs.info,  Node: Repetition,  Prev: Completion,  Up: Minibuffer
  1086.  
  1087. Repeating Minibuffer Commands
  1088. =============================
  1089.  
  1090.    Every command that uses the minibuffer at least once is recorded on a
  1091. special history list, together with the values of the minibuffer
  1092. arguments, so that you can repeat the command easily.  In particular,
  1093. every use of `Meta-x' is recorded, since `M-x' uses the minibuffer to
  1094. read the command name.
  1095.  
  1096. `C-x ESC'
  1097.      Re-execute a recent minibuffer command
  1098.      (`repeat-complex-command').
  1099.  
  1100. `M-p'
  1101.      Within `C-x ESC', move to previous recorded command
  1102.      (`previous-history-element').
  1103.  
  1104. `M-n'
  1105.      Within `C-x ESC', move to the next (more recent) recorded command
  1106.      (`next-history-element').
  1107.  
  1108. `M-x list-command-history'
  1109.      Display the entire command history, showing all the commands `C-x
  1110.      ESC' can repeat, most recent first.
  1111.  
  1112.    `C-x ESC' is used to re-execute a recent command that used the
  1113. minibuffer. With no argument, it repeats the last command.  A numeric
  1114. argument specifies which command to repeat; 1 means the last one, and
  1115. larger numbers specify earlier commands.
  1116.  
  1117.    `C-x ESC' works by turning the previous command into a Lisp
  1118. expression and then entering a minibuffer initialized with the text for
  1119. that expression.  If you type just RET, the command is repeated as
  1120. before.  You can also change the command by editing the Lisp expression.
  1121. The expression you finally submit will be executed.  The repeated
  1122. command is added to the front of the command history unless it is
  1123. identical to the most recently executed command already there.
  1124.  
  1125.    Even if you don't understand Lisp syntax, it will probably be obvious
  1126. which command is displayed for repetition.  If you do not change the
  1127. text, you can be sure the command will repeat exactly as before.
  1128.  
  1129.    If you are in the minibuffer for `C-x ESC' and the command shown to
  1130. you is not the one you want to repeat, you can move around the list of
  1131. previous commands using `M-n' and `M-p'.  `M-p' replaces the contents
  1132. of the minibuffer with the next earlier recorded command, and `M-n'
  1133. replaces it with the next later command.  After finding the desired
  1134. previous command, you can edit its expression and then resubmit it by
  1135. typing RET.  Any editing you have done on the command to be repeated is
  1136. lost if you use `M-n' or `M-p'.
  1137.  
  1138.    `M-n' and `M-p' are specially defined within `C-x ESC' to run the
  1139. commands `previous-history-element' and `next-history-element'.
  1140.  
  1141.    The list of previous commands using the minibuffer is stored as a
  1142. Lisp list in the variable `command-history'.  Each element of the list
  1143. is a Lisp expression which describes one command and its arguments.
  1144. Lisp programs can reexecute a command by feeding the corresponding
  1145. `command-history' element to `eval'.
  1146.  
  1147.